<template>
  <view>
    <view class="content">
      <u-navbar autoBack fixed placeholder bg-color="transparent" left-icon-color="#ffffff"></u-navbar>
      <view style="width: 100%;height: 120px;">
        <!-- <view style="margin-top: 50px;color: #ffffff;font-size: 20px;text-align: center;letter-spacing: 12px;">总资产</view>
        <view style="margin-top: 30px;color: #ffffff;text-align: center;">
          <text style="font-size: 40px;letter-spacing: 2px;">56.87</text>
          <text style="font-size: 14px;margin-left: 5px;">元</text>
        </view> -->
      </view>
      <view class="card">
        <view class="logo">
          <image
            src="/static/logo.png"
            mode="aspectFit"
          />
        </view>
        <view class="card_wrap">
          <view class="card_img">
            <image
              src="/static/placeholder_user.png"
              mode="scaleToFill"
            />
          </view>
          <view class="card_info">
            <view>姓名：{{ name }}</view>
            <view>学号：{{ username }}</view>
            <view>专业：{{ major }}</view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  data() {
    return {}
  },
  computed: {
    ...mapGetters(['username', 'name', 'major'])
  },
  methods: {},
  watch: {},
} 
</script>

<style scoped lang="scss">
  .content {
    width: 100vw;
    height: 100vh;
    padding-top: var(--status-bar-height);
    box-sizing: border-box;
    background: linear-gradient(150deg, rgba($color: #006bc3, $alpha: 1) 0%, rgba($color: #000e56, $alpha: 1) 100%);
  }

  .card {
    width: calc(100vw - 40px);
    height: 180px;
    margin: 20px;
    border-radius: 14px;
    background-image: url('/static/card.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;

    .logo {
      display: flex;
      justify-content: flex-start;
      width: 200px;
      height: 40px;
      padding-top: 15px;
      margin: 0 10px;

      image {
        width: 100%;
        height: 100%;
      }
    }
  }

  .card_wrap {
    position: relative;
    display: flex;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;

    .card_info {
      flex: 1;
      margin-left: 30px;
    
      view {
        height: 25px;
        line-height: 25px;
        color: #ffffff;
      }
    }

    .card_img {
      image {
        width: 74px;
        height: 82px;
        background-color: #ffffff;
      }
    }
  }
</style>